<?php
$word = "tripled";
$wordLength = strlen($word);
$result = "";
for ($i = 0; $i <= $wordLength; $i++) {
	$result .= str_repeat(substr($word, $i, 1), 3);
}
echo $result;
?>